package edu.sctu.practice.class02.yangyiqing.assign3.test1;

/**
 * Created by Administrator on 2015/10/22 0022.
 */
public class Rectangle extends GeometricObject {


    public double height;
    public double width;


    public Rectangle(String color, double height, double width) {
        super(color);
        this.height = height;
        this.width = width;
    }

    @Override
    public double findArea() {
        return height * width;
    }

    @Override
    public double findPerimeter() {
        return 2 * height + 2 * width;
    }
}
